#include <stdio.h>

int main(void)//通过下标访问数组
{
    int i = 0;
    int arr[10] = {1,2,3,4,5,6,7,8,9,10};
    for(i=0;i<10;i++)
    {
        printf("%d",arr[i]);
    }
    printf("\n");
    return 0;
}

typedef unsigned int un_i;//typedef把复杂的类型简化

int main()
{
    unsigned int num1 = 0;
    un_i num2=0;
    return 0;
}

#include<stdio.h>//static修饰局部变量使其出了作用域还有效
void test()
{
    static int i = 0;
    i++;
    printf("%d",i);
}
int main()
{
    int i = 0;
    for(i=0;i<10;i++)
    {
        test();
    }
    return 0;
}

#define MAX 100//定义常量
#define ADD(x,y) ((x)+(y))//定义宏
#include<stdio.h>

int main()
{
    int sum = ADD(2,3);
    printf("sum=%d\n",sum);
    sum = 10*ADD(2,3);
    printf("sum = %d\n",sum);
    return 0;
}

int main()
{
    int num = 10;
    int *p=&num;
    *p=20;
    printf("%p\n",&num);
}

